import { REG } from "@/data/locations";
import { PageLifeProbeRequire } from "@/data/settings";
import { StyleMgr } from "../libs/core/styleOperation";

const entry = (): boolean => {
  return StyleMgr.add(
    "bananaFlash",
    `
    .video-description .action-area .right-area > div.banana .div-banana {
      display: block;
      z-index: 20;
    }
    #main .introduction .up-area .up-interactive .follow-up.followed {
      z-index: 8;
    }
    #main .introduction .up-area .up-interactive .btn-reward {
      z-index: 8;
    }  
  `
  );
};

const module: ModulesConstructure = {
  name: "bananaFlash",
  type: "style",
  start: entry,
  condition: {
    siteMatch: [REG.video, REG.bangumi],
    pageLifeProbeRequire: PageLifeProbeRequire.Footer,
  },
  optionUI: {
    enable: {
      type: "switch",
      department: "video",
      dependency: [],
      onActivate: () => {
        return true;
      },
      onDeactivate: () => {
        return false;
      },
    },
  },
};

export default module;
